Hệ thống quản lý phương tiện trong PHP
1 <?php
2 $connection= mysqli_connect("localhost","root","","vehiclemanagement");
3
4 session_start();
5
6 $sql= "SELECT * FROM `vehicle`";
7 $res=mysqli_query($connection,$sql);
8 ?>
9 <!DOCTYPE html>
10 <html lang="en">
11 <head>
12 <meta charset="UTF-8">
13 <title>List of Drivers</title>
14 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
15 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
16 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
17 <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
18 <link rel="stylesheet" href="animate.css">
19 <link rel="stylesheet" href="style.css">
20
21 </head>
22
23 <body >
24
25 <div id="myDiv">
26
27 <?php include 'navbar.php'; ?>
28 <br><br><br>
29 <div class="container">
30 <?php
31 if(mysqli_num_rows($res)>0){ ?>
32
33 <div class="container">
34 <div class="row">
35 <div class="col-md-3"></div>
36 <div class="col-md-6 foo">
37 <div class="page-header">
38 <h1 class="animated bounceIn" style="text-align: center;">Vehicle List</h1>
39 </div>
40 <table class="table">
41 <thead>
42 <th>Bus Picture</th>
43 <th>Bus Registration No</th>
44 </thead>
45
46 <?php while($row=mysqli_fetch_assoc($res)) { ?>
47 <tbody>
48 <tr>
49 <td><img height="100px" width="100px" src="vehicle picture/<?php echo $row["veh_photo"]; ?>" alt="dp"></td>
50
51 <td><a href="busprofile.php?busid=<?php echo $row["veh_id"]; ?>"> <?php echo $row["veh_reg"] ?></a></td>
52 </tr>
53 </tbody>
54 <?php } }?>
55 </table>
56 </div>
57 <div class="col-md-3"></div>
58 </div>
59
60 </div>
61
62 </div>
63 </div>
64
65 <script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
66
67
68 <script>
69 window.sr = ScrollReveal();
70 sr.reveal('.foo', { duration: 800 });
71 sr.reveal('.foo1', { duration: 800,origin: 'top'});
72 </script>
73
74
75
76
77 </body>
78 </html>